import { createRouter, createWebHashHistory } from 'vue-router'
import Login from '../views/Login.vue'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      redirect: { name: 'Login' }
    },
    {
      path: '/login',
      name: 'Login',
      menuName: '登录页',
      component: Login
    },
    {
      path: '/home',
      name: 'Home',
      component: () => import('../views/Home.vue')
    },
    {
      path: '/option',
      name: 'Option',
      component: () => import('../views/Option.vue')
    },
    {
      path: '/order',
      name: 'Order',
      component: () => import('../views/Order.vue')
    }
  ]
})

// router.beforeEach((to, from, next) => {
//   next()
// })

export default router
